<template>
  <h3>img-upload 组件示例</h3>
  <f-img-upload
    isCropping
    v-model:value="fileList"
    :fileSize="4"
    folder="zhagnzhao"
    @change="handleChange" />
  <pre>{{ fileList }}</pre>
  <img src="productImg/2c93001ab36912625521777dce3c2c63.png" v-imgGive class="w100" />
</template>
<script setup>
import { ref } from 'vue';

// const fileList = ref([]);
const fileList = ref([
  {
    id: '1737749191570001922',
    url: 'zhagnzhao/20240815/ff47146925884612ae465e29d60b4ff6.png',
    fileTypeName: 'image/jpeg',
    folderName: '',
    fileSize: 64,
    fileName: '6ff4fc1b645c5dc9fa5df1f7aa411b98',
    createDate: '2023-12-21 16:17:47',
    updateDate: '2023-12-21 16:17:47'
  }
]);

// setTimeout(() => {
//   const list = [{ "url": "productImg/2c93001ab36912625521777dce3c2c63.png" }]
//   fileList.value = list;
// }, 1000 * 3);

const handleChange = (file) => {
  console.log('handleChange', file);
};
</script>
<style lang="scss" scoped></style>
